package com.ruoyi.manage.utils;

import cn.hutool.extra.qrcode.QrCodeUtil;
import cn.hutool.extra.qrcode.QrConfig;

/**
 * @author : 赵志冲
 * @date : 2024-07-02 22:58
 * @description :
 **/
public class QrCodeBase64 {

    public static String genQrCodeAsBase64(String codeUrl) {
        QrConfig qrConfig
                = new QrConfig();
        qrConfig.setHeight(350);
        qrConfig.setWidth(350);
        String base64 = QrCodeUtil.generateAsBase64(codeUrl, qrConfig, "png");

        System.out.println(base64);

        return base64;
    }
}
